package co.edu.unal.research.contentprovider.extensions;

import co.edu.unal.research.contentprovider.contentProviderDsl.Table;
import co.edu.unal.research.contentprovider.contentProviderDsl.TableColumn;
import com.google.inject.Inject;
import org.eclipse.emf.common.util.EList;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import org.eclipse.xtext.xbase.lib.StringExtensions;

@SuppressWarnings("all")
public class TableExtensions {
  @Inject
  private IQualifiedNameProvider _iQualifiedNameProvider;
  
  public String getTableNameConstant(final Table table) {
    String _name = table.getName();
    String _operator_plus = StringExtensions.operator_plus("TABLE_", _name);
    return _operator_plus;
  }
  
  public String getColumnNameConstant(final TableColumn tableColumn) {
    String _name = tableColumn.getName();
    String _operator_plus = StringExtensions.operator_plus("COLUMN_", _name);
    return _operator_plus;
  }
  
  public String getColumnAdditionalFeatures(final TableColumn tableColumn) {
    String _xblockexpression = null;
    {
      String featuresFinal = ((String) "");
      EList<String> _additionalFeatures = tableColumn.getAdditionalFeatures();
      for (final String feature : _additionalFeatures) {
        String _operator_plus = StringExtensions.operator_plus(featuresFinal, " ");
        String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, feature);
        featuresFinal = _operator_plus_1;
      }
      String _operator_plus_2 = StringExtensions.operator_plus(featuresFinal, " ,");
      _xblockexpression = (_operator_plus_2);
    }
    return _xblockexpression;
  }
}
